package com.example.common;

import java.util.HashMap;
import java.util.Map;

/**
 * 订单状态：0-未支付，1-已支付未发货，2-已发货，3-待收货，4-已收货，5-已评价，-1-申请退款,-2-已退款
 */
public class OrderConstant {
    /**
     * 0-未支付
     */
    public static final int ORDER_UNPAID = 0;
    /**
     * 1-已支付未发货
     */
    public static final int ORDER_PRE_DELIVERY = 1;
    /**
     * 2-已发货
     */
    public static final int ORDER_DELIVERY = 2;
    /**
     * 3-待收货
     */
    public static final int ORDER_PRE_RECEIVE = 3;
    /**
     * 4-已收货
     */
    public static final int ORDER_RECEIVE = 4;
    /**
     * 5-已评价
     */
    public static final int ORDER_COMMENT = 5;
    /**
     * -1-申请退款
     */
    public static final int ORDER_PRE_RETURN = -1;
    /**
     * -2-已退款
     */
    public static final int ORDER_RETURN = -2;
    public static final String ORDER_UNPAID_NAME = "未支付";
    public static final String ORDER_PRE_DELIVERY_NAME = "待发货";
    public static final String ORDER_DELIVERY_NAME = "已发货";
    public static final String ORDER_PRE_RECEIVE_NAME = "待收货";
    public static final String ORDER_RECEIVE_NAME = "已收货";
    public static final String ORDER_COMMENT_NAME = "已评价";
    public static final String ORDER_PRE_RETURN_NAME = "申请退货";
    public static final String ORDER_RETURN_NAME = "已退货";
    /**
     * 订单状态：0-未支付，1-已支付未发货，2-已发货，3-待收货，4-已收货，5-已评价，-1-申请退款,-2-已退款
     */
    public static Map<Integer, String> ORDER_STATE_MAP = new HashMap<>();

    static {
        ORDER_STATE_MAP.put(ORDER_UNPAID, ORDER_UNPAID_NAME);
        ORDER_STATE_MAP.put(ORDER_PRE_DELIVERY, ORDER_PRE_DELIVERY_NAME);
        ORDER_STATE_MAP.put(ORDER_DELIVERY, ORDER_DELIVERY_NAME);
        ORDER_STATE_MAP.put(ORDER_PRE_RECEIVE, ORDER_PRE_RECEIVE_NAME);
        ORDER_STATE_MAP.put(ORDER_RECEIVE, ORDER_RECEIVE_NAME);
        ORDER_STATE_MAP.put(ORDER_COMMENT, ORDER_COMMENT_NAME);
        ORDER_STATE_MAP.put(ORDER_PRE_RETURN, ORDER_PRE_RETURN_NAME);
        ORDER_STATE_MAP.put(ORDER_RETURN, ORDER_RETURN_NAME);
    }
}
